package main

import "fmt"

func main() {
	months := [...]string{
		1:  "January",
		2:  "February",
		3:  "March",
		4:  "April",
		5:  "May",
		6:  "June",
		7:  "July",
		8:  "August",
		9:  "September",
		10: "October",
		11: "November",
		12: "December", // 后面的逗号不能省略
	}

	fmt.Printf("months = %v, type = %[1]T, len = %d, cap = %d\n", months, len(months), cap(months))

	Q2 := months[4:7]
	summer := months[6:9]

	fmt.Printf("Q2 = %v, type = %[1]T, len = %d, cap = %d\n", Q2, len(Q2), cap(Q2))
	fmt.Printf("summer = %v, type = %[1]T, len = %d, cap = %d\n", summer, len(summer), cap(summer))
}
